<?php
class SortToplist extends CWidget
{
	public function run(){
		$type = 'jianfei';	//默认排行是减肥
		if(isset($_GET['type']) && in_array($_GET['type'],array('jianfei','qudou','fuzhuang','suma','shouji','meirong'))){
			$type=trim($_GET['type']);
		}
		$jianfeiClass = ($type=='jianfei') ? 'itemsort' : 'itemsort  activesort';
		$qudouClass = ($type=='qudou') ? 'itemsort' : 'itemsort  activesort';
		$fuzhuangClass = ($type=='fuzhuang') ? 'itemsort' : 'itemsort  activesort';
		$sumaClass = ($type=='suma') ? 'itemsort' : 'itemsort  activesort';
		$shoujiClass = ($type=='shouji') ? 'itemsort' : 'itemsort  activesort';
		$meirongClass = ($type=='meirong') ? 'itemsort' : 'itemsort  activesort';
		echo CHtml::link('减肥排行', array('reliable/toplist','type'=>'jianfei'), array('title'=>'减肥产品销售排行榜','class'=>$jianfeiClass));
		echo CHtml::link('美容排行', array('reliable/toplist','type'=>'meirong'), array('title'=>'美容产品销售排行榜','class'=>$meirongClass));
		echo CHtml::link('祛痘排行', array('reliable/toplist','type'=>'qudou'), array('title'=>'祛痘产品销售排行榜','class'=>$qudouClass));
		echo CHtml::link(Yii::app()->params['fuzhuangkw'].'排行', array('reliable/toplist','type'=>'fuzhuang'), array('title'=>'时尚服装销售排行榜','class'=>$fuzhuangClass));
		echo CHtml::link('数码排行', array('reliable/toplist','type'=>'suma'), array('title'=>'数码产品销售排行榜','class'=>$sumaClass));
		echo CHtml::link('手机排行', array('reliable/toplist','type'=>'shouji'), array('title'=>'手机产品销售排行榜','class'=>$shoujiClass));
	}
}
?>
